package com.zmn.plat.model.entity.product;

import com.zmn.common.utils.pager.Operator;

import java.util.Date;

/**
 * @author tanghongjun
 * @version v1.0
 * @类说明：
 * @since 2018/10/16 11:30
 */
public class ServSubsidiaryGroupItem extends Operator {
    private Integer relateId;

    private Integer itemId;

    /**
     * 状态：1停用，2启用
     */
    private Integer groupId;

    private String creater;

    private Date createTime;

    private static final long serialVersionUID = 1L;

    public Integer getRelateId() {
        return relateId;
    }

    public void setRelateId(Integer relateId) {
        this.relateId = relateId;
    }

    public Integer getItemId() {
        return itemId;
    }

    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ServSubsidiaryGroupItem other = (ServSubsidiaryGroupItem) that;
        return (this.getRelateId() == null ? other.getRelateId() == null : this.getRelateId().equals(other.getRelateId())) && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId())) && (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId())) && (this.getCreater() == null ? other.getCreater() == null : this.getCreater().equals(other.getCreater())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRelateId() == null) ? 0 : getRelateId().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
        result = prime * result + ((getCreater() == null) ? 0 : getCreater().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", relateId=").append(relateId);
        sb.append(", itemId=").append(itemId);
        sb.append(", groupId=").append(groupId);
        sb.append(", creater=").append(creater);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}